/*
****************************************************************************************
* @FilePath     : protocol_cmd.h
* @brief        : 
* @author       : L0131 - guomingpeng 952856693@qq.com
* @attention    : Copyright (c) 2024 awptech.co.ltd. All rights reserved.
****************************************************************************************
*/
#ifndef _PROTOCOL_CMD_H_
#define _PROTOCOL_CMD_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#define _PROTOCOL_LINK_DEBUG_EN 0

#define COM_LINK_ID       0     //通信链路状态

typedef struct
{
    uint16_t cmd_index;
    void (*set)(uint8_t *payload_buf);
    void (*get)(uint8_t *payload_buf);
    uint32_t (*send_handle)(uint8_t *buf);
}protocol_cmd_handle_t;

extern void protocol_cmd_send_data_encode(uint8_t *buf, uint32_t *len);
extern void protocol_cmd_handle(void);

#ifdef __cplusplus
}
#endif
#endif	/* _PROTOCOL_CMD_H_ */
